package com.hk.employeemanagementsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hk.employeemanagementsystem.entity.MenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author by 何坤
 * @Classname MenuEntityMapper
 * @Description TODO
 * @Date 2019/12/19 11:13
 */
@Mapper
public interface MenuEntityMapper extends BaseMapper<MenuEntity> {
    /**
     * 根据用户的角色Id获取对应的菜单项
     * @param roleId
     * @return java.util.List<com.hk.employeemanagementsystem.entity.MenuEntity>
     * @date 2019/12/19 14:57
     * @author 何坤
     */
    List<MenuEntity> selectMenuEntityByRoleId(@Param("roleId") Integer roleId);

    List<MenuEntity> menuTree();

    List<MenuEntity> selectAllMenu();

    List<Integer> getMenusByRId(Integer rid);
}
